Change vec::{head,tail,init,last} to return references#5213
Closed
erickt wants to merge 9 commits intorust-lang:incomingfrom
Closed
Change vec::{head,tail,init,last} to return references#5213erickt wants to merge 9 commits intorust-lang:incomingfrom
erickt wants to merge 9 commits intorust-lang:incomingfrom
Conversation
Contributor
|
r+ |
Contributor
Author
|
@kud1ing: thanks for catching that. I'll fix it. |
Contributor
Author
|
I think this should work now. Unfortunately http://buildbot.rust-lang.org is down, so I can't confirm. Can it be retried again? |
bors
added a commit
that referenced
this pull request
Mar 6, 2013
This patch series changes a handful of vec functions to return references instead of copies. The one downside with making this change is that these functions aren't usable in a couple cases now due to some purity complaints. For example, this [change](erickt@c31e81a#L1R87). I couldn't figure out a way to get `last` to work on a `@mut ~[...]` type, so I ended up having to use `*crate_cache[crate_cache.len() - 1].metas`.
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
May 2, 2020
Use generator own DefId Fixes rust-lang#5207 changelog: Fix ICE in `missing_errors_doc`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch series changes a handful of vec functions to return references instead of copies. The one downside with making this change is that these functions aren't usable in a couple cases now due to some purity complaints. For example, this change. I couldn't figure out a way to get
lastto work on a@mut ~[...]type, so I ended up having to use*crate_cache[crate_cache.len() - 1].metas.